ONNXModelHub
This class provides methods for loading ONNX model from android application resources.
Constructors
ONNXModelHub
Link copied to clipboard
Functions
get
Link copied to clipboard
operator fun <T : InferenceModel, U : InferenceModel> get(modelType: ModelType<T, U>): U
Content copied to clipboard
loadModel
Link copied to clipboard
open override fun <T : InferenceModel, U : InferenceModel> loadModel(modelType: ModelType<T, U>, loadingMode: LoadingMode): T
Content copied to clipboard
It's equivalent to loadModel with ExecutionProvider.CPU execution provider.
fun loadModel(modelType: OnnxModelType<*>, vararg executionProviders: ExecutionProvider = arrayOf(ExecutionProvider.CPU())): OnnxInferenceModel
Content copied to clipboard
Loads ONNX model from android resources. By default, the model is initialized with ExecutionProvider.CPU execution provider.
loadPretrainedModel
Link copied to clipboard
fun <T : InferenceModel, U : InferenceModel> loadPretrainedModel(modelType: ModelType<T, U>, loadingMode: LoadingMode): U
Content copied to clipboard